class Student{
    private String name;
    private int age;
    private String num;
    public String getName(){
        return this.name;
    }
    public void setName(String name){
        this.name=name;
    }

    public void Eat(){
        System.out.println(name+"正在进食");
    }
    public void Study(){
        System.out.println(name+"正在学习");
    }
    public Student(){
        System.out.println("不需要带参数的构造方法");
    }
    public Student(String name,int age,String num){
        this.name=name;
        this.age=age;
        this.num=num;
        System.out.println("这是需要三个参数的构造方法");
    }
}
public class test5_10 {
    public static void main(String[] args) {
        Student stu1=new Student();
        Student stu2=new Student("小米渣",1,"123456");
    }
    public static void main01(String[] args) {
        Student stu1=new Student();
        stu1.name="小远";
        stu1.age=100;
        stu1.num="250";
        stu1.Eat();
        stu1.Study();
        System.out.println("-----------");
        Student stu2=new Student();
        stu2.name="猫猫";
        stu2.age=99;
        stu2.num="520";
        stu2.Eat();
        stu2.Study();
    }
}
